home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13260 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  43 lines

  1. Newsgroups: comp.lang.c++
  2. Path: newsfeed.internetmci.com!miwok!linex1!news
  3. From: mfried@linex.com (Marty Fried)
  4. Subject: Re: ***Newbie Help with arrays and linker errors!!!***
  5. X-Nntp-Posting-Host: sp25.linex.com
  6. Message-ID: <3154f90f.3453577@news.linex.com>
  7. Sender: news@linex1.linex.com
  8. Organization: Cirrius Cybernetics Corp
  9. X-Newsreader: Forte Agent .99e/32.194
  10. References: <315064BC.287C@maine.maine.edu>
  11. Date: Sun, 24 Mar 1996 07:29:22 GMT
  12.  
  13. Once upon a time (OK, it was Wed, 20 Mar 1996 15:04:12 -0500),
  14. aspenc51 <aspenc51@maine.maine.edu> wrote:
  15.  
  16. >I'm just starting to learn programming, and I've run into a sort of block with arrays.  I've got this simple die 
  17. >roller that rolls 4 six-sideds and subtracts the lowest of the 4 from the total, and I just can't get it to work.  
  18. >I've looked for errors, but there are no complier problems my wrench-in-the-works is a single linker error.  
  19. >(undefined symbol 'minimum(int, int)' in module 'diceroll.cpp')  Can someone show me where things are running amuck? 
  20. > This thing's driving me crazy!  Just please e-mail me with your suggestions since my news server kind of only half 
  21. >works.
  22. >
  23. >Here's the program (written under Borland 4.52 C++)
  24. > . . .
  25. >int randadd(int, int);
  26. >int minimum(int, int);  <<<<< This is what the linker is looking for ***
  27. > . . .
  28. >int minimum( int roll_array[], int length)        //finds minimum value
  29. >{
  30. >    . . .
  31. > }
  32.  
  33. You've told the linker that there is a function minimum that takes two
  34. ints, but you have only provided a function minimum that takes an int
  35. array and an int.
  36.  
  37. cc  aspenc51 <aspenc51@maine.maine.edu>
  38.  
  39. _______________________________________________________
  40. Marty Fried - mfried@linex.com     Press Enter to Exit
  41. San Anselmo, CA                           -NT message
  42. (MSVC4 + MFC) && (Win95 || NT);             
  43.